﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Notes/NTS-Menu.master" AutoEventWireup="true" CodeFile="NTS-EditDoc.aspx.cs" Inherits="Notes_NTS_EditDoc" %>

<%@ Register Src="~/UserControls/User-Login.ascx" TagName="Login" TagPrefix="control" %>
<%@ Register Src="~/Notes/UserControls/NTS-SideSearch.ascx" TagName="SearchContrl" TagPrefix="control" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headSubMaster" Runat="Server">

 <script type="text/javascript">


     function GetDynamicFileUpload() {
         return ' <div class="registerion_row registerion_row_none"><div class="registerion_row_left">Upload Image</div>' +
        '<div class="registerion_row_right"><input name = "ImageFileUpload"  type="file"  onchange="return checkFileExtensionNotes(this);"/>' +
        '  <input class="w60px" type="button" value="Remove" onclick = "RemoveFileUpload(this)" /> </div></div>'
     }
     var upload_number = 0;
     function AddFileUpload() {
         var div = document.createElement('DIV');
         div.innerHTML = GetDynamicFileUpload("");
         document.getElementById("divFileUpload").appendChild(div);
     }

     function RemoveFileUpload(div) {
         document.getElementById("divFileUpload").removeChild(div.parentNode.parentNode.parentNode);
         upload_number--;
     }

     //Adding dynamic video textboxes
     var vid = 0;
     function GetDynamicTextBox(value) {
         return ' <div class="registerion_row registerion_row_none"><div class="registerion_row_left">You Tube Video Path</div>' +
        '<div class="registerion_row_right"><input name = "VideoTextBox"  type="text" value = "' + value + '" Class="input115px input345px"/>' +
        '  <input class="w60px" type="button" value="Remove" onclick = "RemoveTextBox(this)" /> </div></div>'
     }
     function AddTextBox() {
         var VideoLimit = 5;
         if (vid < VideoLimit) {
             var div = document.createElement('DIV');
             div.innerHTML = GetDynamicTextBox("");
             document.getElementById("divVideos").appendChild(div);
             vid++;
         }
         else {
             alert("Sorry you can not upload more than " + VideoLimit);
         }
     }

     function RemoveTextBox(div) {
         document.getElementById("divVideos").removeChild(div.parentNode.parentNode.parentNode);
         vid--;
     }

 </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_SubMaster" Runat="Server">
      <div class="clear"></div>
<section>
    <div class="left_column">

    <asp:HiddenField ID="hdnFeatured" runat="server" />
    <asp:HiddenField ID="hdnTop" runat="server" />
    <asp:HiddenField ID="hdnHomepage" runat="server" />

    <div class="product_row_large">
          <h1>Update Documents</h1>
          <div  class="pl10px">
     
   <asp:Label ID="lblMsg" runat="server" CssClass="password verticalalign12px" Font-Bold="true" ForeColor="Red" EnableViewState="false"></asp:Label>
         
          <div class="registerion_row registerion_row_none">
              <div class="registerion_row_left">Title <span class="redstar">*</span></div>
              <div class="registerion_row_right">
                <ul>
                   <li><asp:TextBox ID="txtTitle" CssClass="input115px input345px" runat="server" MaxLength="49"></asp:TextBox></li>
                   <%--<li><asp:CheckBox ID="CheckBox1" runat="server" /> Featured</li>--%>                  
                </ul>
         	  </div>
         </div> 
    
         <div class="registerion_row registerion_row_none">
              <div class="registerion_row_left">Description </div>
              <div class="registerion_row_right">
              
                <asp:TextBox ID="txtDescription" CssClass="input115px input345px" runat="server" 
                      Height="188px" TextMode="MultiLine" Width="474px"></asp:TextBox>
         	  </div>
         </div>
             
              <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
              <ContentTemplate>
         
         <div class="registerion_row registerion_row_none">
              <div class="registerion_row_left">Stream<span class="redstar">*</span></div>
              <div class="registerion_row_right">
                  <asp:DropDownList ID="ddlStream" CssClass="droupdownlist dropdownarrowstyle"  AutoPostBack="true"
                      Width="357" runat="server" 
                      onselectedindexchanged="ddlStream_SelectedIndexChanged">
                  </asp:DropDownList>
                <div class="listbox_icon_profile"></div> 
         	  </div>
         </div>

         <div class="registerion_row registerion_row_none">
              <div class="registerion_row_left">Subject<span class="redstar">*</span></div>
              <div class="registerion_row_right">
                  <asp:DropDownList ID="ddlSubject" CssClass="droupdownlist dropdownarrowstyle" Width="357" runat="server" AppendDataBoundItems="true">
                  <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                  </asp:DropDownList>
                <div class="listbox_icon_profile"></div> 
         	  </div>
         </div>

         </ContentTemplate></asp:UpdatePanel>

                
         <div class="registerion_row registerion_row_none">
              <div class="registerion_row_left">University</div>
              <div class="registerion_row_right">
                 <asp:DropDownList ID="ddlUniversity" CssClass="droupdownlist dropdownarrowstyle" Width="357" runat="server" AppendDataBoundItems="true">
                  <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                  </asp:DropDownList>
                <div class="listbox_icon_profile"></div> 
         	  </div>
         </div> 
       
          <div class="registerion_row registerion_row_none">
              <div class="registerion_row_left">Document Type<span class="redstar">*</span></div>
              <div class="registerion_row_right">
                 <asp:DropDownList ID="ddlDocType" CssClass="droupdownlist dropdownarrowstyle" Width="357" runat="server" AppendDataBoundItems="true">
                  <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                  <asp:ListItem Text="Notes" Value="1"></asp:ListItem>
                  <asp:ListItem Text="Question Papers" Value="2"></asp:ListItem>
                  </asp:DropDownList>
                <div class="listbox_icon_profile"></div> 
         	  </div>
         </div> 
                     <asp:ImageButton ID="ImageButton1" ImageUrl="~/Classified/images/update.jpg" class="mt20px submitbutton" 
                   runat="server"  onclick="ImageButton1_Click"  />
    &nbsp;&nbsp;<asp:Label ID="lblMessage" runat="server" CssClass="password verticalalign12px" Font-Bold="true" ForeColor="Red" EnableViewState="false"></asp:Label>
       
     <div class="clear"></div>
                 
      </div>
      <div class="clear"></div>
        </div>
   
       </div>
      <div class="right_column"> 
     
   <control:Login ID="Login2" runat="server" />
    
    <control:SearchContrl ID="Search1" runat="server" />
<%--  
        <control:SideAd ID="sideAd" runat="server" />--%>

  </div>
      <div class="clear"></div>
      </section>
</asp:Content>

